package com.greydawn.ProxyPattern;

/**
 * @author zhongwr
 * @date 2021-12-09 16:31:10
 * @description 代理类
 */
public class Proxy implements PresentGift {

    private Boy boy;

    public Proxy(Boy boy) {
        this.boy = boy;
    }

    @Override
    public void presentFlower(Girl girl) {
        System.out.println("代理类，代理" + boy.getName());
        boy.presentFlower(girl);
    }

    @Override
    public void presentSkirt(Girl girl) {
        System.out.println("代理类，代理" + boy.getName());
        boy.presentSkirt(girl);
    }
}
